(function ( exports ) {

//region ExecuteMultipleSettings

    /**
     * Execute multiple settings
     * @param {boolean} continueOnError Continue On Error
     * @param {boolean} returnResponses Return responses
     * @prop {boolean} continueOnError Continue On Error
     * @prop {boolean} returnResponses Return responses
     * @memberOf COSA
     * @constructor ExecuteMultipleSettings
     */
    function ExecuteMultipleSettings( continueOnError, returnResponses ) {
        COSA.XrmValueBase.call(this);

        this.continueOnError = continueOnError;
        this.returnResponses = returnResponses;
    }

    COSA.Util.deriveOverride(COSA.XrmValueBase, ExecuteMultipleSettings, {
        type: 'ExecuteMultipleSettings',
        namespace: 'http://schemas.microsoft.com/xrm/2012/Contracts',
        requireTypeDef: true,
        validate: function () {
            (new COSA.ValueChecker(this.continueOnError))
                .defined()
                .typeOf('boolean');

            (new COSA.ValueChecker(this.returnResponses))
                .defined()
                .typeOf('boolean');
        },
        getTemplate: function ( sc, ltr ) {
            return [{
                tag: ltr.tag('ContinueOnError'),
                val: this.continueOnError
            }, {
                tag: ltr.tag('ReturnResponses'),
                val: this.returnResponses
            }];
        }
    });

    //endregion ExecuteMultipleSettings

    exports.ExecuteMultipleSettings = ExecuteMultipleSettings;
})(COSA);
